package tests;

import java.io.IOException;
import java.sql.SQLException;

import annotations.Repeat;
import annotations.Skip;

public class Test1 {
	
	@Repeat(retries=2, selfHandling=MojaObsluga.class, interval=3)
	public void metoda1() throws IOException{
		System.out.println("wywoluje sie metoda");
		throw new IOException();
	}
	
	@Repeat(retries=2, include={SQLException.class})
	public void metoda2() throws IOException{
		System.out.println("wywoluje sie metoda");
		throw new IOException();
	}
	
	@Repeat(retries=2, exclude={IOException.class})
	public void metoda3() throws IOException{
		System.out.println("wywoluje sie metoda");
		throw new IOException();
	}
	
	@Skip(include={IOException.class})
	public void metoda4() throws IOException{
		throw new IOException();
	}
	
	public static void main(String[] args) {
		Test1 t1 = new Test1();
		try {
			t1.metoda1();
//			t1.metoda2();
//			t1.metoda3();
//			t1.metoda4();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
